package com.example.jetpack_databinding.main5

import android.util.Log
import androidx.databinding.BaseObservable
import androidx.databinding.Bindable
import androidx.databinding.ObservableBoolean
import androidx.databinding.ObservableField
import com.example.jetpack_databinding.BR
import com.example.jetpack_databinding.main4.User
import kotlin.random.Random

class UserViewmodel{

    var userobservableField: ObservableField<User> = ObservableField<User>()
    constructor() {
        userobservableField.set(User("roses"))
    }


//    fun getUserName(): String? {
//        return userobservableField.get()?.userName
//    }
//
//    fun setUserName(userName: String?) {
//        if (userName != null) {
//            userobservableField.get()?.userName=userName
//        }
//    }


}